#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pymysql
import connUtil


def mysqlCommand(conn, sql, opera):
    cursor = conn.cursor()
    cursor.execute(sql)
    result = opera(cursor)
    return result


if __name__ == '__main__':
    sql1 = 'select * from inst_hero_skill'
    testConn = connUtil.getTestConn()
    result1 = mysqlCommand(testConn, sql1, pymysql.cursors.DictCursor.fetchall)
    print(result1)


